import { createRouter, createWebHistory } from 'vue-router'

import TabBar from '../components/TabBar.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    components:{
     default: () => import( '../views/home/index.vue'),
     footer:TabBar
    } 
  },
  {
    path: '/search',
    name: 'search',
    component: () => import( '../views/search/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
